﻿function labelthumbs(json){
	document.write('<div class="thumbcont1">');
	for(var i=0;i<numposts;i++){
		var entry=json.feed.entry[i];
		var posttitle=entry.title.$t;
		var posturl;if(i==json.feed.entry.length)break;
	for(var k=0;k<entry.link.length;k++){
		if(entry.link[k].rel=='replies'&&entry.link[k].type=='text/html'){
			var commenttext=entry.link[k].title;var commenturl=entry.link[k].href;
			}
if(entry.link[k].rel=='alternate'){
	posturl=entry.link[k].href;break;}}
	var thumburl;try{thumburl=entry.img+src.url;
}catch(error){s=entry.content.$t;a=s.indexOf("<img");b=s.indexOf("src=\"",a);c=s.indexOf("\"",b+5);d=s.substr(b+5,c-b-5);if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!=""))
{thumburl=d;}

else thumburl='http://2.bp.blogspot.com/_IKigl6y9hFA/TMdcT1jzo5I/AAAAAAAAAHA/hAKuT9rJpFU/noimage.jpg';}

if(showpostthumbnails==true)
document.write('<div class="cont"><a href="'+posturl+'" title="'+posttitle+'"><img class="label_thumb" src="'+thumburl+'"/></a><div id="info_cont"><div id="judul"><a href="'+posturl+'"</a>'+posttitle+'</div><div class="detail_button"><a href="'+posturl+'"><img class="san-pham" src="http://1.bp.blogspot.com/-WUw5v9ba6NU/Untt_PBMGqI/AAAAAAAAA8U/N70EDtXTzDQ/s1600/chi-tiet.png" ></a></div>');if("content"in entry){var postcontent=entry.content.$t;}


else
if("summary"in entry){var postcontent=entry.summary.$t;}
else var postcontent="";var re=/<\S[^>]*>/g;postcontent=postcontent.replace(re,"");if(showpostsummary==true){if(postcontent.length<numchars){document.write('');document.write(postcontent);document.write('');}
                                                                                                             else{document.write('<div class="price"><a href=#">');postcontent=postcontent.substring(0,numchars);var quoteEnd=postcontent.lastIndexOf(" ");postcontent=postcontent.substring(0,quoteEnd);document.write(postcontent);document.write('</a></div></div></div>');}}

if(i!=(numposts-1))
document.write('');}

document.write('</div>');}